﻿using JHT.EFMigrationTest.ClassLibrary1.Entity;
using System.Data.Entity.ModelConfiguration;

namespace JHT.EFMigrationTest.ClassLibrary1
{
    internal class StudentClassMap : EntityTypeConfiguration<StudentClass>
    {
        public StudentClassMap()
        {
            HasKey(p => p.StudentId);
            ToTable("View_StudentClass");
            Property(p => p.StudentId).HasColumnName("StudentId").HasColumnType("bigint").IsRequired();
            Property(p => p.ClassId).HasColumnName("ClassId").HasColumnType("bigint").IsRequired();
            Property(p => p.StudentName).HasColumnName("StudentName").HasColumnType("varchar").IsRequired();
            Property(p => p.ClassName).HasColumnName("ClassName").HasColumnType("varchar").IsRequired();
        }
    }
}